import { App } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/normal',
  },
  {
    path: '/normal',
    component: () => import('./views/NormalQuestion.vue'),
  },
  {
    path: '/step',
    component: () => import('./views/StepQuestion.vue'),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default function (app: App) {
  app.use(router);
}
